﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LevSTProgramTransform
{
    public partial class ReceiveDataTransformForm : Form
    {
        const string Define_OneWire_SystemData_Str = "OneWire_SystemData_Group";
        const string Define_OneWire_EEPROM_Str = "OneWire_EEPROM_Group";
        string OneWire_SystemData_Str = "";
        string OneWire_EEPROM_Str = "";
        byte[] OneWire_SystemData;
        byte[] OneWire_EEPROM;

        public ReceiveDataTransformForm()
        {
            InitializeComponent();
        }
        public void setReceiveDataString(string receive)
        {
            string[] strArr = receive.Split('\n');
            foreach (string str in strArr)
            {
                if (str.Contains(Define_OneWire_SystemData_Str))
                {
                    OneWire_SystemData_Str = str;
                }
                else if (str.Contains(Define_OneWire_EEPROM_Str))
                {
                    OneWire_EEPROM_Str = str;
                }
            }
        }
        public void setOneWire_SystemData(byte[] data)
        {
            OneWire_SystemData = data;
        }
        public void setOneWire_EEPROM(byte[] data)
        {
            OneWire_EEPROM = data;
        }    

    }
}
